]> dgit.raspbian.org Git - gnome-shell.git/commit
systemActions: Create SensorProxy unconditionally
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 15 Jun 2019 14:31:53 +0000 (16:31 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 8 Aug 2019 11:42:28 +0000 (11:42 +0000)
commit928b49705ffad93845a71648b0ad2ca9874fa8cc
treeda4c8bcc2289ac51c3c399d0d08271ea01b2d0e9
parentf50cac30051cd69aefa94a2c48378376ead21e63
systemActions: Create SensorProxy unconditionally

When plugging in a device with sensors that are unsupported by
iio-sensor-proxy, the proxy may quit so fast that the name disappears
from the bus before we get to construct the SensorProxy in response
to the name-appeared handler, resulting in the following warning:

JS ERROR: TypeError: this._sensorProxy is null
_sensorProxyAppeared/this._sensorProxy<@resource:///org/gnome/shell/misc/systemActions.js:217:17
_makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/overrides/Gio.js:243:21

Address this by creating the proxy unconditionally instead of monitoring
the bus name, and using the g-name-owner property to determine whether
iio-sensor-proxy is active.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1357
js/misc/systemActions.js